<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>ResourceLoader - Go2d</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="Go2d" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: 1.6.7</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/Class.html">Class</a></li>
                                <li><a href="../classes/Director.html">Director</a></li>
                                <li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
                                <li><a href="../classes/Ease.html">Ease</a></li>
                                <li><a href="../classes/Event.html">Event</a></li>
                                <li><a href="../classes/EventEmitter.html">EventEmitter</a></li>
                                <li><a href="../classes/go2d.html">go2d</a></li>
                                <li><a href="../classes/ImageView.html">ImageView</a></li>
                                <li><a href="../classes/Matrix.html">Matrix</a></li>
                                <li><a href="../classes/ObjectPool.html">ObjectPool</a></li>
                                <li><a href="../classes/ResizeEvent.html">ResizeEvent</a></li>
                                <li><a href="../classes/ResourceLoader.html">ResourceLoader</a></li>
                                <li><a href="../classes/ScrollEvent.html">ScrollEvent</a></li>
                                <li><a href="../classes/ScrollView.html">ScrollView</a></li>
                                <li><a href="../classes/Sprite.html">Sprite</a></li>
                                <li><a href="../classes/Stage.html">Stage</a></li>
                                <li><a href="../classes/TextField.html">TextField</a></li>
                                <li><a href="../classes/TouchEvent.html">TouchEvent</a></li>
                                <li><a href="../classes/Tween.html">Tween</a></li>
                                <li><a href="../classes/URLRequest.html">URLRequest</a></li>
                                <li><a href="../classes/Vector.html">Vector</a></li>
                            </ul>
                
                            <ul id="api-modules" class="apis modules">
                                <li><a href="../modules/go2d.html">go2d</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>ResourceLoader Class</h1>
<div class="box meta">

        <div class="extends">
            Extends <a href="../classes/EventEmitter.html" class="crosslink">EventEmitter</a>
        </div>

        <div class="foundat">
            Defined in: <a href="../files/src_net_ResourceLoader.js.html#l1"><code>src\net\ResourceLoader.js:1</code></a>
        </div>

            Module: <a href="../modules/go2d.html">go2d</a>

</div>


<div class="box intro">
    <p>资源加载器类，可用于加载和管理游戏资源。</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_ResourceLoader" class="method item">
            <h3 class="name"><code>ResourceLoader</code></h3>
        
                <div class="args">
                    <span class="paren">(</span><ul class="args-list inline commas">
                        <li class="arg">
                                <code>resources</code>
                        </li>
                        <li class="arg">
                                <code class="optional">[options]</code>
                        </li>
                    </ul><span class="paren">)</span>
                </div>
        
        
        
        
        
        
        
        
            <div class="meta">
                        <p>
                        Defined in
                <a href="../files/src_net_ResourceLoader.js.html#l1"><code>src\net\ResourceLoader.js:1</code></a>
                </p>
        
        
        
            </div>
        
            <div class="description">
                
            </div>
        
                <div class="params">
                    <h4>Parameters:</h4>
        
                    <ul class="params-list">
                        <li class="param">
                                <code class="param-name">resources</code>
                                <span class="type">Object</span>
        
        
                            <div class="param-description">
                                <p>资源路径数据对象，格式如下：</p>
        
                            </div>
        
                        </li>
                        <li class="param">
                                <code class="param-name optional">[options]</code>
                                <span class="type">Object</span>
                                <span class="flag optional" title="This parameter is optional.">optional</span>
        
        
                            <div class="param-description">
                                <p>配置参数</p>
        
                            </div>
        
                                <ul class="params-list">
                                    <li class="param">
                                            <code class="param-name optional">[retryTimes=3]</code>
                                            <span class="type">Object</span>
                                            <span class="flag optional" title="This parameter is optional.">optional</span>
        
                                        <div class="param-description">
                                            <p>失败重试次数</p>
        
                                        </div>
        
                                    </li>
                                </ul>
                        </li>
                    </ul>
                </div>
        
        
        
                <div class="example">
                    <h4>Example:</h4>
        
                    <div class="example-content">
                        <pre class="code prettyprint"><code>
        new ResourceLoader({
            text: {
                name1: url1,
                name2: url2
                // ...
            },
            image: {
                name1: url1,
                name2: url2
                // ...
            }
            // ...
        });
        </code></pre>
                    </div>
                </div>
        </div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
            <li class="api-class-tab events"><a href="#events">Events</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods extends">
                            <li class="index-item method">
                                <a href="#method_destroy">destroy</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyAll">destroyAll</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyAudio">destroyAudio</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyBinary">destroyBinary</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyImage">destroyImage</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyJSON">destroyJSON</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyText">destroyText</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_destroyXML">destroyXML</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_dispose">dispose</a>

                            </li>
                            <li class="index-item method inherited inherited">
                                <a href="#method_emit">emit</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_get">get</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getAudio">getAudio</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getBinary">getBinary</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getImage">getImage</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getJSON">getJSON</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getText">getText</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getXML">getXML</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_load">load</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_off">off</a>

                            </li>
                            <li class="index-item method inherited inherited">
                                <a href="#method_on">on</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties extends">
                            <li class="index-item property private inherited">
                                <a href="#property___events">__events</a>

                            </li>
                            <li class="index-item property protected">
                                <a href="#property__cache">_cache</a>

                            </li>
                            <li class="index-item property protected">
                                <a href="#property__resources">_resources</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_errorCount">errorCount</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_loadedCount">loadedCount</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_retryTimes">retryTimes</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_total">total</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_AUDIO">TYPE_AUDIO</a>

                                    <span class="flag static">static</span>
                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_BINARY">TYPE_BINARY</a>

                                    <span class="flag static">static</span>
                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_IMAGE">TYPE_IMAGE</a>

                                    <span class="flag static">static</span>
                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_JSON">TYPE_JSON</a>

                                    <span class="flag static">static</span>
                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_TEXT">TYPE_TEXT</a>

                                    <span class="flag static">static</span>
                            </li>
                            <li class="index-item property">
                                <a href="#property_TYPE_XML">TYPE_XML</a>

                                    <span class="flag static">static</span>
                            </li>
                    </ul>
                </div>


                <div class="index-section events">
                    <h3>Events</h3>

                    <ul class="index-list events extends">
                            <li class="index-item event">
                                <a href="#event_complete">complete</a>

                            </li>
                            <li class="index-item event">
                                <a href="#event_error">error</a>

                            </li>
                            <li class="index-item event">
                                <a href="#event_finish">finish</a>

                            </li>
                            <li class="index-item event">
                                <a href="#event_progress">progress</a>

                            </li>
                    </ul>
                </div>
        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_destroy" class="method item">
    <h3 class="name"><code>destroy</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[type]</code>
                </li>
                <li class="arg">
                        <code class="optional">[name]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l275"><code>src\net\ResourceLoader.js:275</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[type]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>资源类型，为空时移除所有资源</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[name]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>资源名称，为空时移除所有指定类型资源</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyAll" class="method item">
    <h3 class="name"><code>destroyAll</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l346"><code>src\net\ResourceLoader.js:346</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除所有资源</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyAudio" class="method item">
    <h3 class="name"><code>destroyAudio</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l328"><code>src\net\ResourceLoader.js:328</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除音频资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyBinary" class="method item">
    <h3 class="name"><code>destroyBinary</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l337"><code>src\net\ResourceLoader.js:337</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除二进制资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyImage" class="method item">
    <h3 class="name"><code>destroyImage</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l319"><code>src\net\ResourceLoader.js:319</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除图像资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyJSON" class="method item">
    <h3 class="name"><code>destroyJSON</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l301"><code>src\net\ResourceLoader.js:301</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除 JSON 资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyText" class="method item">
    <h3 class="name"><code>destroyText</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l310"><code>src\net\ResourceLoader.js:310</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除文本资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_destroyXML" class="method item">
    <h3 class="name"><code>destroyXML</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l292"><code>src\net\ResourceLoader.js:292</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除 XML 资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_dispose" class="method item">
    <h3 class="name"><code>dispose</code></h3>

        <span class="paren">()</span>








    <div class="meta">
            <p>Inherited from
            <a href="../classes/EventEmitter.html#method_dispose">
                EventEmitter
            </a>
            but overwritten in
        <a href="../files/src_net_ResourceLoader.js.html#l355"><code>src\net\ResourceLoader.js:355</code></a>
        </p>



    </div>

    <div class="description">
        <p>释放加载器内存</p>

    </div>




</div>
<div id="method_emit" class="method item inherited">
    <h3 class="name"><code>emit</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code class="optional">[event]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
            <p>Inherited from
            <a href="../classes/EventEmitter.html#method_emit">
                EventEmitter
            </a>
            but overwritten in
        <a href="../files/src_event_EventEmitter.js.html#l75"><code>src\event\EventEmitter.js:75</code></a>
        </p>



    </div>

    <div class="description">
        <p>通过事件对象派发事件</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>事件名称</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[event]</code>
                        <span class="type"><a href="../classes/Event.html" class="crosslink">Event</a></span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>事件对象</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_get" class="method item">
    <h3 class="name"><code>get</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>type</code>
                </li>
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l209"><code>src\net\ResourceLoader.js:209</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取资源对象</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源类型</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getAudio" class="method item">
    <h3 class="name"><code>getAudio</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l257"><code>src\net\ResourceLoader.js:257</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取音频资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getBinary" class="method item">
    <h3 class="name"><code>getBinary</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l266"><code>src\net\ResourceLoader.js:266</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取二进制资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getImage" class="method item">
    <h3 class="name"><code>getImage</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l248"><code>src\net\ResourceLoader.js:248</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取图像资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getJSON" class="method item">
    <h3 class="name"><code>getJSON</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l230"><code>src\net\ResourceLoader.js:230</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取 JSON 资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getText" class="method item">
    <h3 class="name"><code>getText</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l239"><code>src\net\ResourceLoader.js:239</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取文本资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_getXML" class="method item">
    <h3 class="name"><code>getXML</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l221"><code>src\net\ResourceLoader.js:221</code></a>
        </p>



    </div>

    <div class="description">
        <p>获取 XML 资源</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>资源名称</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>对应的资源对象</p>

            </div>
        </div>


</div>
<div id="method_load" class="method item">
    <h3 class="name"><code>load</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_net_ResourceLoader.js.html#l193"><code>src\net\ResourceLoader.js:193</code></a>
        </p>



    </div>

    <div class="description">
        <p>开始加载资源</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_off" class="method item inherited">
    <h3 class="name"><code>off</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code class="optional">[callback]</code>
                </li>
                <li class="arg">
                        <code class="optional">[thisArg]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/EventEmitter.html#method_off">EventEmitter</a>:
        <a href="../files/src_event_EventEmitter.js.html#l52"><code>src\event\EventEmitter.js:52</code></a>
        </p>



    </div>

    <div class="description">
        <p>移除事件侦听器</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>事件名称</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[callback]</code>
                        <span class="type">Function</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>回调函数，当该参数为空时将移除该事件的所有回调</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[thisArg]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>回调执行时 this 关键字所引用的对象</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
<div id="method_on" class="method item inherited">
    <h3 class="name"><code>on</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>callback</code>
                </li>
                <li class="arg">
                        <code class="optional">[thisArg]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">This</span>
        </span>







    <div class="meta">
            <p>Inherited from
            <a href="../classes/EventEmitter.html#method_on">
                EventEmitter
            </a>
            but overwritten in
        <a href="../files/src_event_EventEmitter.js.html#l21"><code>src\event\EventEmitter.js:21</code></a>
        </p>



    </div>

    <div class="description">
        <p>添加事件侦听器</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>事件名称</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                        <p>回调函数</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[thisArg]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>回调执行时 this 关键字所引用的对象</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">This</span>:
            </div>
        </div>


</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

                    <div id="property___events" class="property item private inherited">
                        <h3 class="name"><code>__events</code></h3>
                        <span class="type">Object</span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>Inherited from
                                    <a href="../classes/EventEmitter.html#property___events">EventEmitter</a>:
                            <a href="../files/src_event_EventEmitter.js.html#l13"><code>src\event\EventEmitter.js:13</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>侦听器哈希表</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__cache" class="property item protected">
                        <h3 class="name"><code>_cache</code></h3>
                        <span class="type">Object</span>
                    
                    
                            <span class="flag protected">protected</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l33"><code>src\net\ResourceLoader.js:33</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>缓存的资源对象</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__resources" class="property item protected">
                        <h3 class="name"><code>_resources</code></h3>
                        <span class="type">Object</span>
                    
                    
                            <span class="flag protected">protected</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l41"><code>src\net\ResourceLoader.js:41</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>资源路径数据对象</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property_errorCount" class="property item">
                        <h3 class="name"><code>errorCount</code></h3>
                        <span class="type">Number</span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l57"><code>src\net\ResourceLoader.js:57</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载失败资源数量</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property_loadedCount" class="property item">
                        <h3 class="name"><code>loadedCount</code></h3>
                        <span class="type">Number</span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l65"><code>src\net\ResourceLoader.js:65</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载完成资源数量</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property_retryTimes" class="property item">
                        <h3 class="name"><code>retryTimes</code></h3>
                        <span class="type">Number</span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l73"><code>src\net\ResourceLoader.js:73</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>失败重试次数</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> 3</p>
                    
                    
                    </div>
                    <div id="property_total" class="property item">
                        <h3 class="name"><code>total</code></h3>
                        <span class="type">Number</span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l49"><code>src\net\ResourceLoader.js:49</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>资源总数</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property_TYPE_AUDIO" class="property item">
                        <h3 class="name"><code>TYPE_AUDIO</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l405"><code>src\net\ResourceLoader.js:405</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>音频</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> audio</p>
                    
                    
                    </div>
                    <div id="property_TYPE_BINARY" class="property item">
                        <h3 class="name"><code>TYPE_BINARY</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l415"><code>src\net\ResourceLoader.js:415</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>二进制数据</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> binary</p>
                    
                    
                    </div>
                    <div id="property_TYPE_IMAGE" class="property item">
                        <h3 class="name"><code>TYPE_IMAGE</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l395"><code>src\net\ResourceLoader.js:395</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>图像</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> image</p>
                    
                    
                    </div>
                    <div id="property_TYPE_JSON" class="property item">
                        <h3 class="name"><code>TYPE_JSON</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l375"><code>src\net\ResourceLoader.js:375</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>JSON 数据</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> json</p>
                    
                    
                    </div>
                    <div id="property_TYPE_TEXT" class="property item">
                        <h3 class="name"><code>TYPE_TEXT</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l385"><code>src\net\ResourceLoader.js:385</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>文本数据</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> text</p>
                    
                    
                    </div>
                    <div id="property_TYPE_XML" class="property item">
                        <h3 class="name"><code>TYPE_XML</code></h3>
                        <span class="type">String</span>
                    
                    
                    
                            <span class="flag final">final</span>
                    
                            <span class="flag static">static</span>
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l365"><code>src\net\ResourceLoader.js:365</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>XML 数据</p>
                    
                        </div>
                    
                            <p><strong>Default:</strong> xml</p>
                    
                    
                    </div>
            </div>


            <div id="events" class="api-class-tabpanel">
                <h2 class="off-left">Events</h2>

                    <div id="event_complete" class="events item">
                        <h3 class="name"><code>complete</code></h3>
                        <span class="type"></span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l179"><code>src\net\ResourceLoader.js:179</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载完全事件</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="event_error" class="events item">
                        <h3 class="name"><code>error</code></h3>
                        <span class="type"></span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l169"><code>src\net\ResourceLoader.js:169</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载错误事件</p>
                    
                        </div>
                    
                            <div class="params">
                                <h4>Event Payload:</h4>
                    
                                <ul class="params-list">
                                    <li class="param">
                                            <code class="param-name">name</code>
                                            <span class="type">String</span>
                    
                    
                                        <div class="param-description">
                                            <p>加载出错资源名称</p>
                    
                                        </div>
                    
                                    </li>
                                </ul>
                            </div>
                    
                    
                    </div>
                    <div id="event_finish" class="events item">
                        <h3 class="name"><code>finish</code></h3>
                        <span class="type"></span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l186"><code>src\net\ResourceLoader.js:186</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载完毕事件</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="event_progress" class="events item">
                        <h3 class="name"><code>progress</code></h3>
                        <span class="type"></span>
                    
                    
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/src_net_ResourceLoader.js.html#l158"><code>src\net\ResourceLoader.js:158</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>加载进度事件</p>
                    
                        </div>
                    
                            <div class="params">
                                <h4>Event Payload:</h4>
                    
                                <ul class="params-list">
                                    <li class="param">
                                            <code class="param-name">loadedCount</code>
                                            <span class="type">Number</span>
                    
                    
                                        <div class="param-description">
                                            <p>已加载数量</p>
                    
                                        </div>
                    
                                    </li>
                                    <li class="param">
                                            <code class="param-name">total</code>
                                            <span class="type">Number</span>
                    
                    
                                        <div class="param-description">
                                            <p>总数量</p>
                    
                                        </div>
                    
                                    </li>
                                </ul>
                            </div>
                    
                    
                    </div>
            </div>
    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
